<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>北京站智能网格化管理系统</title>
    <link rel="stylesheet" href="/assets/css/iconFont/iconfont.css">
    <link rel="stylesheet" href="/assets/css/common.css">
    <link rel="stylesheet" href="/assets/css/station.css">
    <script src="/assets/js/jquery-3.2.1.min.js"></script>
</head>
<body class="station_login">
<div class="station_grid_login">
    <div class="station_login_title">
        <h1>北京站智能网格化</h1>
        <h1>管理系统</h1>
    </div>
    <!--<FORM action="" method="post">-->
    <div class="station_login_right">
        <p class="station_login_loginTit">密码登录</p>
        <input class="station_login_input countBgc" name='user_name' type="text" placeholder="账号" autocomplete="off"/>
        <div class="loginPass">
             <input class="station_login_input passwordBgc" name="user_pass" type="password" placeholder="密码" style="margin-bottom: 0"/>
             <p class="login_tip"></p>
         </div>
        <button  class="station_login_right_btn" type="submit">登录</button>
        <!-- <p class="station_login_forget"><a href="changePass.html">忘记密码？</a></p> -->
    </div>
    <div class="link_A">
        <a href="http://10.78.153.164:14136/download/chrome_forXP.exe">XP系统点此下载谷歌浏览器</a>
        <a href="http://10.78.153.164:14136/download/Chrome.exe">Win7及以上系统点此下载谷歌浏览器</a>
    </div>
    <!--</FORM>-->
</div>
<script>
     $(function(){
    //提交(需要接口)
            $('.station_login_right_btn').on('click',function(){
                var user_name = $("input[name ='user_name']").val();
                var user_pass = $("input[name ='user_pass']").val();
                $.ajax({
                    url:"<?php echo site_url("login/index");?>",
                    data:{
                        user_name:user_name,
                        user_pass:user_pass
                    },
                    dataType:"json",
                    success:function(msg){
                       if(msg.code==0){
                           window.location.href=msg.info;
                       }else if(msg.code==1){
                           $('.login_tip').text(msg.info)
                           console.log(msg.info);
                       }

                    }
                })
            })
//         提交勿删
         $("input[name=user_pass]").keydown(function() {
             if (event.keyCode == "13") {
                 $('.station_login_right_btn').click();
             }
         });

        })

</script>
</body>
</html>